﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SilkeyERP.Model
{
    public partial class SalesPerson
    {
        public void SetNextAvailableSalesPerson()
        {
            using (var context = new SilkeyERPEntities())
            {
                SalesPersonCode = context.SalesPerson.OrderBy(x => x.SalesPersonCode).ToList().Last().SalesPersonCode + 1;
            }
        }
    }
}
